<template>
    <view class="empty">
        <image class="image" mode="widthFix" v-if="emptyType === 'shop'" src="@/static/images/empty-goods.png"></image>
        <image class="image" mode="widthFix" v-if="emptyType === 'record'" src="@/static/images/empty-record.png"></image>
        <image class="image" mode="widthFix" v-if="emptyType === 'search'" src="@/static/images/empty-search.png"></image>
        <text class="text">{{ emptyText }}</text>
    </view>
</template>

<script>
    export default {
        name: "Empty",
		props: {
			emptyType: {
				type: String,
				default: () => {
					return 'shop';
				}
			},
			emptyText: {
				type: String,
				default: () => {
					return '暂无相关商品~';
				}
			}
		}
    }
</script>

<style lang="scss" scoped>
.empty {
    width: 100%;
    height: 500rpx;
    @include flexBox(center, center, column);
    .image {
        width: 50%;
    }
    .text {
        color: #c6c6c6;
        font-size: 32rpx;
        margin: 40rpx 0;
    }
}
</style>